package com.tom.zx.controller;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.tom.zx.entity.HousePictureInformation;
import com.tom.zx.service.IHousePictureInformationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 房屋图片信息 前端控制器
 *
 * @author lp
 * @since 2022-04-12
 */
@RestController
@RequestMapping("/zx/housePictureInformation")
public class HousePictureInformationController {

  @Autowired
  private IHousePictureInformationService housePictureInformationService;

  @GetMapping("houseInformation/{houseInformationId}")
  public List<HousePictureInformation> loadHousePictureInformationList(
      @PathVariable Long houseInformationId) {
    return
            housePictureInformationService.list(
        new LambdaQueryWrapper<HousePictureInformation>()
            .eq(HousePictureInformation::getHouseInformationId, houseInformationId));
  }
}
